home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Other Stuff / Demos ƒ / Demo AppMaker / Demo AppMaker™ / Demo AppMaker™.rsrc / TmCT_302_zApp < prev    next >
Encoding:
Text File  |  1990-03-23  |  1.8 KB  |  75 lines

  1. /* %filename% -- application methods */
  2. /* Created %date% %time% by AppMaker */
  3.  
  4. /*    We recommend that you not modify this module and instead modify        */
  5. /*    its subclass, %Appname%App.  The 'z' prefix on this module marks%    %*/
  6. /*    a module which is likely to be regenerated by AppMaker after you    */
  7. /*    make changes to the user interface.  The modules without the 'z'    */
  8. /*    prefix will not be regenerated by AppMaker unless you delete them.    */
  9. /*    Using a separate subclass to override the AppMaker-generated code    */
  10. /*    lets you regenerate code without losing your hand-coded changes.    */ 
  11.  
  12. #include <Commands.h>
  13. #include <CBartender.h>
  14. #include "ResourceDefs.h"
  15. %for each menu gen includeDialogs%
  16. #include "%Appname%Doc.h"
  17. #include "z%Appname%App.h"
  18.  
  19. extern    OSType         gSignature;
  20. extern    CBartender    *gBartender;
  21.  
  22. /*----------*/
  23. void    Z%Appname%App::I%Appname%App    (void)
  24. {
  25.     CApplication::IApplication (4, 20480L, 2048L);
  26.  
  27.     %for each dialog gen createModeless%
  28. } /* I%Appname%App */
  29.  
  30. /*----------*/
  31. void    Z%Appname%App::SetUpMenus    (void)
  32. {
  33.     inherited::SetUpMenus ();
  34.     %for each menu gen setup%
  35.     %for each menu gen addPopup%
  36.  
  37. } /* SetUpMenus */
  38.  
  39. /*----------*/
  40. void    Z%Appname%App::CreateDocument    (void)
  41. {
  42.     C%Appname%Doc%    %*theDocument;
  43.  
  44.     theDocument = new (C%Appname%Doc);
  45.     theDocument->I%Appname%Doc (this, TRUE);
  46.     theDocument->NewFile ();
  47.  
  48. } /* CreateDocument */
  49.  
  50. /*----------*/
  51. void    Z%Appname%App::OpenDocument    (SFReply    *macSFReply)
  52. {
  53.     C%Appname%Doc%    %*theDocument;
  54.  
  55.     theDocument = new (C%Appname%Doc);
  56.     theDocument->I%Appname%Doc (this, TRUE);
  57.     theDocument->OpenFile (macSFReply);
  58.  
  59. } /* OpenDocument */
  60.  
  61. %for each menu gen doItems%
  62. /*----------*/
  63. void    Z%Appname%App::DoCommand    (long        theCommand)
  64. {
  65.     switch (theCommand) {
  66.         %for each menu gen handleItems%
  67.         default:
  68.                 inherited::DoCommand (theCommand);
  69.             break;
  70.     } /* switch */
  71.  
  72. } /* DoCommand */
  73.  
  74. /* %filename% */
  75.